bitkeeper revision 1.990.2.5 (40d6e5b3zC98CstrrPt15opAjaQtkg)
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Mon, 21 Jun 2004 13:42:11 +0000 (13:42 +0000)
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Mon, 21 Jun 2004 13:42:11 +0000 (13:42 +0000)
Add domain control message types.

tools/xenmgr/lib/server/messages.py

index f918e5d4401aaa93bf820b6150deeefff3c84664..649629105c528cd56419031aa015d54f3598121a 100644 (file)
@@ -141,6 +141,34 @@ netif_formats = {
 
 msg_formats.update(netif_formats)
 
+#============================================================================
+CMSG_SUSPEND  = 5
+CMSG_SHUTDOWN = 6
+
+CMSG_SHUTDOWN_HALT      = 0
+CMSG_SHUTDOWN_POWEROFF  = 1
+CMSG_SHUTDOWN_REBOOT    = 2
+
+STOPCODE_shutdown       = 0
+STOPCODE_reboot         = 1
+STOPCODE_suspend        = 2
+
+ctrlif_formats = {
+    'ctrlif_suspend_t':
+    (CMSG_SUSPEND, 0, "??"),
+
+    'ctrlif_shutdown_halt_t':
+    (CMSG_SHUTDOWN, CMSG_SHUTDOWN_HALT, "??"),
+    
+    'ctrlif_shutdown_poweroff_t':
+    (CMSG_SHUTDOWN, CMSG_SHUTDOWN_POWEROFF, "??"),
+    
+    'ctrlif_shutdown_reboot_t':
+    (CMSG_SHUTDOWN, CMSG_SHUTDOWN_REBOOT, "??"),
+    }
+
+msg_formats.update(ctrlif_formats)
+
 #============================================================================
 
 class Msg: